// 图片加载失败 默认
import errorimage from '@admin/assets/images/errorimage.jpg'
export default {
  'error-img': async function(el, binding) {
    el.onerror = function() {
      el.src = errorimage
      if (binding.value) {
        Object.keys(binding.value).forEach((key) => {
          el.style[key] = binding.value[key]
        })
      }
    }
  }
}
